home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Interest in comments on the C language.
- Date: 21 Mar 1996 15:47:40 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4ispqsINNkq0@keats.ugrad.cs.ubc.ca>
- References: <4inp40$kj2@ogre.cs.waikato.ac.nz>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4inp40$kj2@ogre.cs.waikato.ac.nz>,
- Oliver R Jones <orj@cs.waikato.ac.nz> wrote:
- >Hiya all. Copies of replies to email please.
- >
- >I'm interested in peoples comments on the following aspects of the C
- >programming language. Please be as objective as you can.. :) I know that's
- >hard in a C advocacy group. :)
- >
- >1: Is C inheriantly efficient (speed and code space wise)?
-
- Only when you sacrifice portability, which C lets you do for the sake of speed.
- This is because C allows many operations to map onto the idoms of the
- implementation's mative machine language. You can take advantage of
- implementation-defined behavior for some operations at the expense of
- sacrificing portability. Some other languages may define operations more
- strictly, leading to ``code explosion'' on architectures in whose machine
- language the defined operations can't be expressed efficiently.
-
- >2: Is C inheriantly very readable and writable? (Easy to code in and for non
- > coders to read)
-
- It is writable after you get used to it. Once you get addicted to C, _other_
- languages become non-writable. :) It's readable to experienced experts, though
- beginners may find it hard to read other people's programs. C requires a large
- character set, and makes lots of use of special symbols. Whereas an integer
- pointer may be declared in some language as ``pt : pointer to integer'', in C,
- you write ``int *pt;''. Whereas in some language you might write
- ``if x = 3 OR y = 4 ...'', in C you would use ``if (x == 3 || x == 4)''.
- A non-coder would not know that || means ``OR'', so the expression would not
- appear intuitive. Another consideration is that C is case sensitive. Someone
- from a Pascal or Modula background will easily get tripped up when the variable
- he declared as 'MyString' is inaccessible through the 'Mystring' identifier.
-
- Why would a non-coder be reading code, by the way? Would a non-musician care
- about reading a musical score?
-
- >3: Is C a very simple language?
-
- It's a simple language, but not overly so. The ISO/ANSI standard document which
- defines the language proper and the standard library is a mere 219 pages long.
- The K&R2 text which is used as a reference by most C programmers is very small
- as well.
-
- >4: Is it consistant with accepted mathematical notations?
-
- No. Accepted mathematical notations are completely beyond the scope of any
- programming language. First of all, mathematical notation is often ambiguous
- and highly context dependent. Secondly, it is two-dimensional, rather than a
- linear sequence of tokens (just look at continued fractions, integrals,
- summations, square roots and so forth). This question is practically
- meaningless since mathematical notation is very rich and varied!
-
- If you want to know more about C's expression grammar, consult a reference
- manual or a tutorial.
-
- C is not a mathematical language. It does not solve equations, or perform
- integrals symbolically or anything of the sort.
-
- >5: Why was C designed and for what purpose?
-
- C was designed to rewrite an early version of the UNIX operating system in a
- high level language which would allow the system to be expressed in terms of
- abstract data and control structures. so that the system could be made portable
- to various architectures. It continues to be the primary development language
- on UNIX systems to this date, and is suitable for application development as
- well as system-level programming (operating system code, embedded kernels and
- the like). It's good for graphics, numerical analysis, text processing,
- compiler construction, device control... etc.
-
- --
-
-